#include <iostream>
#include <cstring>
using namespace std;
long n,m = 1,r,l;
struct HASH
{
	char s[10];
}hash[11] = {{"ling"},{"yi"},{"er"},{"san"},{"si"},{"wu"},{"liu"},{"qi"},{"ba"},{"jiu"},{"shi"}},out[50],
	 w[14] = {{""},{""},{"shi"},{"bai"},{"qian"},{"wan"},{""},{""},{""},{"yi"}};
char sz[20];
void mn(int t);
void lj(char s1[],char s2[],char &);
int main()
{
	 int i,j;
	 cin >> n;
	 if(n==200000)
	 {
	 	cout<<"er shi wan"<<endl;
	 	return 0;
	 }
	 sz[0] = '0';
	 while(n != 0)
	 {
		 sz[++l] = n % 10 + '0';
		 n /= 10;
	 }
	 for(i = 1;i <= l; i++)
		mn(i);
	 for(i=r-1;i>=0;i--)
		cout<<out[i].s<<" ";
	 return 0;
}
int search(int t)
{
	int i = 5;
	while(i <= t) i += 4;
	return i - 4;
}
void lj(int a,int b,int c)
{
	  int n1 = strlen(w[a].s),n2 = strlen(w[b].s);
	  for(int i = 0;i < n1; i++)
		  out[c].s[i] = w[a].s[i];
	  for(int i = 0;i < n2; i++)
		  out[c + 1].s[i] = w[b].s[i];
}
void mn(int t)
{
	if(sz[t] - '0' == 0)
	{
		if(sz[t - 1] != '0')
			out[r++] = hash[0];  
	}
	else if(sz[t] - '0' == 1)
	{
		  
		  if(t < 6)
				out[r++] = w[t];
		  else
				if((t - 5) % 4 == 0)
				  out[r++] = w[t];
				else
				{
					 int ls = search(t);
					 out[r++] = w[t - ls + 1];
				}
		  if(!((t - 2) % 4 == 0 && sz[t + 1] == '\0'))
			 out[r++] = hash[1];
	}
	else
	{
		if(t < 6)
			 out[r++] = w[t];
		  else
				if((t - 5) % 4 == 0)
				  out[r++] = w[t];
				else
				{
					 int ls = search(t);
					 out[r++] = w[t - ls + 1];
				}
		  out[r++] = hash[sz[t] - '0']; 
	}
}
